using OpenTK.Windowing.GraphicsLibraryFramework;

namespace OpenTK.Windowing.Desktop
{
	internal static class Joysticks
	{
		private static readonly GLFWCallbacks.JoystickCallback _joystickCallback;

		public static event GLFWCallbacks.JoystickCallback JoystickCallback;

		static Joysticks()
		{
			GLFWProvider.EnsureInitialized();
			_joystickCallback = delegate(int id, ConnectedState state)
			{
				Joysticks.JoystickCallback(id, state);
			};
			GLFW.SetJoystickCallback(_joystickCallback);
		}
	}
}
